package com.kpx.app.configs;

import android.content.Intent;
import android.content.IntentFilter;

/**
 * User: 陈聪(617909447@qq.com)
 * Date: 2016-07-06
 * Time: 09:15
 * 用于广播action控制
 */
public class BroadcastFilters {
    /** 超市订单页面数据刷新 */
    public static final String BROADCAST_ACTION_SUPERMARKET_REFLUSH_DATA_ORDER = "BROADCAST_ACTION_SUPERMARKET_REFLUSH_DATA_ORDER";
    /** 被踢下线广播 */
    public static final String BROADCAST_ACTION_LOGIN_OUT_KICK = "BROADCAST_ACTION_LOGIN_OUT_KICK";
    public static final String BROADCAST_ACTION_REFRESH_TASK_DATA = "BROADCAST_ACTION_REFRESH_TASK_DATA";
    public static final String BROADCAST_ACTION_NEED_RELOGIN = "BROADCAST_ACTION_NEED_RELOGIN";
    public static final String BROADCAST_ACTION_SUPERMARKET_REFLUSH_DATA = "BROADCAST_ACTION_SUPERMARKET_REFLUSH_DATA";
    public static final String BROADCAST_ACTION_LOGIN_SUCCESS_BACK = "BROADCAST_ACTION_LOGIN_SUCCESS_BACK";
    public static final String BROADCAST_ACTION_SUPERMARKET_GO_MAIN = "BROADCAST_ACTION_SUPERMARKET_GO_MAIN";
    public static final String BROADCAST_ACTION_SUPERMARKET_REFRESH_ONE_ORDER = "BROADCAST_ACTION_SUPERMARKET_REFRESH_ONE_ORDER";
    public static final String BROADCAST_ACTION_MOBILE_BE_ORDER_SUCCESS = "BROADCAST_ACTION_MOBILE_BE_ORDER_SUCCESS";

    /**
     * 图片上传相关广播
     */
    public static final String BROADCAST_ACTION_UPLOAD_STATUS_PROGRESS = "BROADCAST_ACTION_UPLOAD_STATUS_PROGRESS";
    public static final String BROADCAST_ACTION_UPLOAD_STATUS_CANCEL = "BROADCAST_ACTION_UPLOAD_STATUS_CANCEL";
    public static final String BROADCAST_ACTION_UPLOAD_STATUS_REBIND = "BROADCAST_ACTION_UPLOAD_STATUS_REBIND";
    public static final String BROADCAST_ACTION_UPLOAD_STATUS_BEGIN = "BROADCAST_ACTION_UPLOAD_STATUS_BEGIN";
    public static final String BROADCAST_ACTION_UPLOAD_ADD_PHOTOS = "BROADCAST_ACTION_UPLOAD_ADD_PHOTOS";
    public static final String BROADCAST_ACTION_UPLOAD_SERVICE_ASK = "BROADCAST_ACTION_UPLOAD_SERVICE_ASK";
    public static final String BROADCAST_ACTION_UPLOAD_SERVICE_ALIVE = "BROADCAST_ACTION_UPLOAD_SERVICE_ALIVE";

    public static final String BROADCAST_ACTION_REFRESH_DATA = "BROADCAST_ACTION_REFRESH_DATA";
    public static final String BROADCAST_ACTION_JPUSH = "BROADCAST_ACTION_JPUSH";

    public static void addAction(IntentFilter intentFilter) {
        intentFilter.addAction(BroadcastFilters.BROADCAST_ACTION_LOGIN_OUT_KICK);//被踢下线广播
        intentFilter.addAction(BroadcastFilters.BROADCAST_ACTION_SUPERMARKET_REFLUSH_DATA);//超市刷新购物车数据广播
        intentFilter.addAction(BroadcastFilters.BROADCAST_ACTION_SUPERMARKET_GO_MAIN);//超市购物车进入超市主页
        intentFilter.addAction(BroadcastFilters.BROADCAST_ACTION_SUPERMARKET_REFLUSH_DATA_ORDER);//超市订单页面数据刷新
        intentFilter.addAction(BroadcastFilters.BROADCAST_ACTION_SUPERMARKET_REFRESH_ONE_ORDER);//超市订单详情操作之后发送广播刷新指定订单状态
        intentFilter.addAction(BroadcastFilters.BROADCAST_ACTION_LOGIN_SUCCESS_BACK);//用户登录之后超市模块状态刷新
        intentFilter.addAction(BroadcastFilters.BROADCAST_ACTION_MOBILE_BE_ORDER_SUCCESS);//购买手机号订单成功
        intentFilter.addAction(BroadcastFilters.BROADCAST_ACTION_NEED_RELOGIN);
        intentFilter.addAction(BroadcastFilters.BROADCAST_ACTION_UPLOAD_STATUS_PROGRESS);
        intentFilter.addAction(BroadcastFilters.BROADCAST_ACTION_UPLOAD_STATUS_CANCEL);
        intentFilter.addAction(BroadcastFilters.BROADCAST_ACTION_UPLOAD_STATUS_BEGIN);
        intentFilter.addAction(BroadcastFilters.BROADCAST_ACTION_UPLOAD_STATUS_REBIND);
        intentFilter.addAction(BroadcastFilters.BROADCAST_ACTION_UPLOAD_ADD_PHOTOS);
        intentFilter.addAction(BroadcastFilters.BROADCAST_ACTION_UPLOAD_SERVICE_ASK);
        intentFilter.addAction(BroadcastFilters.BROADCAST_ACTION_UPLOAD_SERVICE_ALIVE);
        intentFilter.addAction(BroadcastFilters.BROADCAST_ACTION_REFRESH_DATA);
        intentFilter.addAction(BroadcastFilters.BROADCAST_ACTION_JPUSH);
        intentFilter.addAction(BroadcastFilters.BROADCAST_ACTION_REFRESH_TASK_DATA);
        intentFilter.addAction(Intent.ACTION_TIME_TICK);
    }
}
